package gunbiao;
import java.io.Serializable;

public class Person implements Serializable {
    //显式定义serialVersionUID
    private static final long serialVersionUID = 1L;
   
    private String name;//姓名
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    private int age;//年龄
    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    private double height; //身高
    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    private double weight;//体重
    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    private String number;//电话号码
    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", height=" + height +
                ", weight=" + weight +
                ", number='" + number + '\'' +
                '}';
    }


    public Person(String name, int age, double height, double weight, String number) {  // 构造方法
        this.name = name;
        this.age = age;
        this.height = height;
        this.weight = weight;
        this.number = number;
    }

}